<h1>New movie</h1>

<% form_for(@movie) do |f| %>
  <%= f.error_messages %>

  <p>
    <%= f.label :title %><br />
    <%= f.text_field :title %>
  </p>
  <p>
    <%= f.label :description %><br />
    <%= f.text_area :description %>
  </p>
  <p>
    <%= f.label :rating %><br />
	<%= f.select :rating, @ratings%>
  </p>
  <p>
    <%= f.label :released_on %><br />
    <%= f.date_select :released_on, :start_year => 1900, :end_year => Time.now.year %>
  </p>
  <p>
    <%= f.submit 'Create' %>
  </p>
<% end %>

<%= link_to 'Back', movies_path %>
